<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* Function */
        var arr = new Array(1,2,3)
        /* Array.prototype */
        console.log(arr);
        /* sum */
        Array.prototype.sum = function(params){
            if(Array.isArray(params)){
                return params.reduce((a,b)=>a+b)
            }
        }
        console.log(arr.sum(arr));

        var arr = [1,2,3]
        Array.prototype.http = function(){
            console.log("http");
        }
        arr.http()
    </script>
</body>
</html>